{% if chapter.depth == 2 %}
{% set type = 'unit' %}
{% elseif chapter.depth == 1 %}
{% set type = 'chapter' %}
{% endif %}

{% if type == 'unit' %}
<li id="chapter-{{chapter.id}}" class="task-manage-item drag js-task-manage-{{type}} task-manage-{{type}} clearfix" style="cursor: default">
  <div class="item-line"></div>
  <div class="item-content" style="color:#666">
    <a class="js-toggle-show js-toggle-{{ type }} cd-link-assist" href="javascript:;">
      <i class="es-icon es-icon-keyboardarrowdown cd-mr16"></i></a>{{ chapter.name }}
  </div>
  <div class="item-actions">{% if chapter.question_num %}{{ chapter.question_num }}{% endif %}</div>
</li>
{% else %}
<li id="chapter-{{chapter.id}}" class="task-manage-item drag js-task-manage-{{type}} task-manage-{{type}} clearfix" style="cursor: default">
  <div class="item-content" style="color:#333">
    <a class="js-toggle-show js-toggle-{{ type }} cd-link-assist" href="javascript:;">
      <i class="es-icon es-icon-keyboardarrowdown cd-mr16"></i></a>{{ chapter.name }}
  </div>
  <div class="item-actions" style="color:#333">{% if chapter.question_num %}{{ chapter.question_num }}{% endif %}</div>
</li>
{% endif %}
